home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / TFC017.422 < prev    next >
Text File  |  1993-03-20  |  6KB  |  141 lines

  1. 2TFC017.MOD 1Show Anony Ability to User thru 'Y'ourinfo
  2. The Flying Chicken [SysOp] #1 @12456
  3. 3Friday, March 19, 1993  1 5:51 pm
  4. TFC017.MOD - Show Anon Ability to Users
  5. Author:     The Flying Chicken 1@12456 (WWIVLink) 1@2456 (WWIVNet) 1@2456 (IceN
  6. et)
  7. Source:     WWIV 4.20 - 4.22
  8. Version:    1.2
  9.  
  10.     This is another one of my useless usefull mods.  I wanted my
  11.     users to know if they could read and post anon messages and
  12.     e-mail, so I wrote this.  If your users can read or post
  13.     anon, it will tell them when they do a 'Y' (yourinfo) from
  14.     the main menu.  As an addition, it also gives the user
  15.     his post/call and upload/download ratios, and shows the amount
  16.     of gold they have (if you have the GoldSys mod installed!!)
  17.  
  18.     v1.2 - Upgrade for 4.22
  19.     v1.0 - Initial Release
  20.  
  21.  
  22.     Before using this or any mod, back up your source !!!!!
  23.  
  24.                 PKZIP source *.c *.h *.mak
  25.  
  26.  
  27.     1. Load up BBSUTL.C and search for yourinfo().  Make the
  28.        changes shown.
  29.  
  30.        /* The code below is WWIV versions under 4.22.  If you
  31.           have 4.22, go to step 1a.                             */
  32.  
  33.         Add this to the top of the void:
  34.  
  35. void yourinfo()
  36. {
  37.   slrec ss;                                                 /* ADD */
  38.  
  39.   ss = syscfg.sl[thisuser.sl];                              /* ADD */
  40.  
  41.  
  42.     No, go down a little farther, and make these changes:
  43.  
  44.   npr("On today       : %d\r\n",thisuser.ontoday);
  45.   npr("Messages posted: %d\r\n",thisuser.msgpost);
  46.   npr("E-mail sent    : %d\r\n",
  47.     (thisuser.emailsent+thisuser.feedbacksent+thisuser.emailnet));
  48.  
  49. /**** Add the next line ONLY if you have the GOLDSYS mod installed !!! *****/
  50.   npr("Gold pieces    : %d\r\n",thisuser.gold);                     /* ADD */
  51.  
  52.   npr("Post/Call ratio: %-6.3f\r\n",post_ratio());                  /* ADD */
  53.   npr("Up/Dnload ratio: %-6.3f\r\n",ratio());                       /* ADD */
  54.   npr("Time spent on  : %ld Minutes\r\n", (long)
  55.     ((thisuser.timeon+timer()-timeon)/60.0));
  56.   nl();
  57.  
  58.   if (ss.ability & ability_email_anony)                             /* ADD */
  59.     if (ss.ability & ability_post_anony)                            /* ADD */
  60.         npr("You can write anonymous messages and E-mail.\r\n");    /* ADD */
  61.     else                                                            /* ADD */
  62.         npr("You can write anonymous E-mail.\r\n");                 /* ADD */
  63.   else                                                              /* ADD */
  64.     if (ss.ability & ability_post_anony)                            /* ADD */
  65.         npr("You can write anonymous messages.\r\n");               /* ADD */
  66.  
  67.   if (ss.ability & ability_read_email_anony)                        /* ADD */
  68.     if (ss.ability & ability_read_post_anony)                       /* ADD */
  69.         npr("You can read anonymous messages and E-mail.\r\n");     /* ADD */
  70.     else                                                            /* ADD */
  71.         npr("You can read anonymous E-mail.\r\n");                  /* ADD */
  72.   else                                                              /* ADD */
  73.     if (ss.ability & ability_read_post_anony)                       /* ADD */
  74.         npr("You can read anonymous messages.\r\n");                /* ADD */
  75.                                                                     /* ADD */
  76.   nl();                                                             /* ADD */
  77. }
  78.  
  79.  
  80.     1a. If you have WWIV 4.22, do this step.  If not, you're done.
  81.         Search for yourinfo() and make the changes shown.
  82.  
  83.     Add this to the top of the void:
  84.  
  85. void yourinfo()
  86. {
  87.   slrec ss;                                                 /* ADD */
  88.  
  89.   ss=syscfg.sl[thisuser.sl];                                /* ADD */
  90.  
  91.  
  92.     No, go down a little farther, and do these changes:
  93.  
  94.   outstr(get_string(366)); pl(thisuser.laston);
  95.   outstr(get_string(607)); pln(thisuser.logons);
  96.   outstr(get_string(608)); pln(thisuser.ontoday);
  97.   outstr(get_string(609)); pln(thisuser.msgpost);
  98.   outstr(get_string(610));
  99.     pln((thisuser.emailsent+thisuser.feedbacksent+thisuser.emailnet));
  100.   outstr(get_string(611)); npr("%ld",(long)
  101.     ((thisuser.timeon+timer()-timeon)/60.0));
  102.   pl(get_string(612));
  103.  
  104. /**** Add the next line ONLY if you have the GOLDSYS mod installed !!! *****/
  105.   npr("Gold pieces    : %d\r\n",thisuser.gold);                     /* ADD */
  106.  
  107.   npr("Post/Call ratio: %-6.3f\r\n",post_ratio());                  /* ADD */
  108.   npr("Up/Dnload ratio: %-6.3f\r\n",ratio());                       /* ADD */
  109.   npr("Time spent on  : %ld Minutes\r\n", (long)
  110.     ((thisuser.timeon+timer()-timeon)/60.0));
  111.   nl();
  112.  
  113.   if (ss.ability & ability_email_anony)                             /* ADD */
  114.     if (ss.ability & ability_post_anony)                            /* ADD */
  115.         npr("You can write anonymous messages and E-mail.\r\n");    /* ADD */
  116.     else                                                            /* ADD */
  117.         npr("You can write anonymous E-mail.\r\n");                 /* ADD */
  118.   else                                                              /* ADD */
  119.     if (ss.ability & ability_post_anony)                            /* ADD */
  120.         npr("You can write anonymous messages.\r\n");               /* ADD */
  121.  
  122.   if (ss.ability & ability_read_email_anony)                        /* ADD */
  123.     if (ss.ability & ability_read_post_anony)                       /* ADD */
  124.         npr("You can read anonymous messages and E-mail.\r\n");     /* ADD */
  125.     else                                                            /* ADD */
  126.         npr("You can read anonymous E-mail.\r\n");                  /* ADD */
  127.   else                                                              /* ADD */
  128.     if (ss.ability & ability_read_post_anony)                       /* ADD */
  129.         npr("You can read anonymous messages.\r\n");                /* ADD */
  130.                                                                     /* ADD */
  131.   nl();                                                             /* ADD */
  132. }
  133.  
  134.  
  135.     DISCLAIMER:  I make no guarantees with this mod whatsoever.
  136.     Your installation of the mod is your acceptance of any
  137.     damages caused to your hardware or software, incendental or
  138.     otherwise.
  139.  
  140.     PLEASE REPORT ANY BUGS!
  141.